#include "mutex.h"
#include "ithread.h"

namespace log4x
{
Mutex::Mutex()
{
    os::thread()->init_mutex(_mtx);
}

Mutex::~Mutex()
{
    os::thread()->uninit_mutex(_mtx);
}

void
Mutex::lock()
{
    os::thread()->lock(_mtx);
}

void
Mutex::unlock()
{
    os::thread()->unlock(_mtx);
}
}
